<script setup>
//导入ref
import { ref,onMounted } from 'vue'
const count = ref(0)
// 定义一个函数，完成add
const add = () => {
  count.value++
}
//声明钩子函数
onMounted(() => {
  console.log('组件挂载完毕')
})
</script>

<template>
<button  @click="add">count is: {{ count }}</button>
</template>

<style scoped>

</style>